import { GetNotRoomDataParams, GetTenantListDataParams } from './model/model';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/@/utils/http/axios/types';

enum Api {
  tenantData = '/admin/comm/getTenantList',
  getNotRoom = '/admin/comm/getNotRoom',
}

/**
 * @description: 获取账单列表
 */
export function GetTenantListDataApi(
  params: GetTenantListDataParams,
  mode: ErrorMessageMode = 'modal'
) {
  return defHttp.request(
    {
      url: Api.tenantData,
      method: 'POST',
      params,
    },
    {
      errorMessageMode: mode,
    }
  );
}

//
export function GetNotRoomListDataApi(
  params: GetNotRoomDataParams,
  mode: ErrorMessageMode = 'modal'
) {
  return defHttp.request(
    {
      url: Api.getNotRoom,
      method: 'POST',
      params,
    },
    {
      errorMessageMode: mode,
    }
  );
}
